Improve explain by predictably ordering predicates#12332
Improve explain by predictably ordering predicates#12332arhimondr merged 1 commit intoprestodb:masterfrom
Conversation
1f588e8 to
fcb5c96
Compare
42126ca to
b179925
Compare
There was a problem hiding this comment.
@jha-gunjan Hmm.... SPI cannot have a dependency on guava. I guess, that means that we can't use ImmutableMap in TuppleDomain. Let's find another way.
There was a problem hiding this comment.
@mbasmanova @jha-gunjan Maria, Gunjan, this is already fixed in upstream -- https://github.com/prestosql/presto
🙂
There was a problem hiding this comment.
You can make something similar to trinodb/trino#226 (or simply cherry pick that).
b179925 to
6666552
Compare
arhimondr
left a comment
There was a problem hiding this comment.
Why don't just use the ImmutableSet and ImmutableMap from Guava? These classes preserve the order.
Additionally it would be nice to have a unit test.
012e7e2 to
0bd410b
Compare
Guava not imported in presto-spi. |
@jha-gunjan when you're cherry picking a commit, it would be nice to retain authorship information. |
Thanks - I prefer that too - however, due to diverging branches and potential conflicts/renames - I manually cherry-picked this time. Added authorship info manually. |
arhimondr
left a comment
There was a problem hiding this comment.
Looks good, thanks for doing this.
Few additional comments.
Also:
- Could you please recover the authorship? You can use
git commit --amend --author='Karol Sobczak <karol.sobczak@karolsobczak.com>' - Could you please address (or at least reply) to this comments
If you decided to address these comments, feel free to address them in a separate commit with your own authorship.
0bd410b to
c7e542a
Compare
Fixes prestodb#11444 Improve plan stability Uses Linked HashMap/HashSet to add ordering of keys.
c7e542a to
56c7ec0
Compare
Fixes #11444 . Cherry pick of TupleDomain.java from trinodb/trino#226
Query PlanPrinter uses TupleDomain, which was giving unpredictable
order of tuples due to the use of HashMap/HashSet.
Switched to LinkedHashMap/LinkedHashSet to get predictable ordering.